import math
a , b = map(float,input().split())
n = int(input())
area = 0
x = a
dx = abs(b-a)/n
for i in range(n):
    x_left = a+i*dx
    x_right = a+(i+1)*dx
    area+=(dx*(abs(math.sin(x_left))+abs(math.sin(x_right)))/2)
print(f'{area:.2f}')





def f(x):
    return x**5-15*x**4+85*x**3-225*x**2+274*x-121
def cal(n, a = 1.5,b = 2.4):
    tol = 10**-n
    for _ in range(100):
        c = (a+b)/2
        if abs(f(c)) < tol:
            return c
        elif f(a)*f(c) < 0:
            b = c
        else:
            a = c
    return (a+b)/2
n = int(input())
ans = cal(n ,1.5,2.4)
print(f'{ans:.6f}')




# 补充你的代码
def prime_factor(n):
    factors = []
    while n%2==0:
        factors.append(2)
        n //= 2
    for i in range(3,int(n**0.5)+1,2):
        while n%i==0:
            factors.append(i)
            n //= i
    if n > 2:
        factors.append(n)
    return factors

n = int(input())
ans = prime_factor(n)
print(" ".join(map(str, ans)))


def income_tax():
    """用户输入应发工资薪金所得、五险一金金额和个税免征额，输出应缴税款和实发工资，
    结果保留小数点后两位。当输入数字小于0 或等于0 时，输出“error”。
    实发工资 = 应发工资 - 五险一金 - 个人所得税
    建议使用以下变量名：
    salary：每月应发工资薪金
    insurance_fund：五险一金
    exemption：个税免征额
    educted_amount：速算扣除数
    测试用例
    输入（冒号前是提示性文字，冒号后的数字为用户输入）
    请输入应发工资薪金金额：16000
    请输入五险一金金额：4000
    请输入个税免征额：5000
    输出
    应缴税款490.00 元，实发工资11510.00 元。
    """
    # ====================Begin===================================
    # 此处去掉注释符号“#”并补充你的代码
    s = eval(input())
    i = eval(input())
    e = eval(input())
    a = s - i - e
    if s <= 0:
        print('error')
    elif a <= 0:
        print(f'应缴税款0.00元，实发工资{s - i:.2f}元。')
    else:
        if 0 < a <= 3000:
            t = a * 0.03
        elif 3000 < a <= 12000:
            t = a * 0.1 - 210
        elif 12000 < a <= 25000:
            t = a * 0.2 - 1410
        elif 25000 < a <= 35000:
            t = a * 0.25 - 2660
        elif 35000 < a <= 55000:
            t = a * 0.3 - 4410
        elif 55000 < a <= 80000:
            t = a * 0.35 - 7160
        elif 80000 <= a:
            t = a * 0.45 - 15160
        r = s - i - t
        print(f'应缴税款{t:.2f}元，实发工资{r:.2f}元。')
    # ======================End=================================


if __name__ == '__main__':
    income_tax()  # 调用函数完成计算和输出



    import math


    def cutting_circle(times):
        side_length = 1
        edges = 6

        def length(x):
            h = math.sqrt(1 - (x / 2) ** 2)
            return math.sqrt((x / 2) ** 2 + (1 - h) ** 2)

        for i in range(times):
            side_length = length(side_length)
            edges *= 2
            pi = side_length * edges / 2

        return edges, pi


    if __name__ == '__main__':
        times = int(input())
        print('分割{}次，边数为{}，圆周率为{:.6f}'.format(times, *cutting_circle(times)))  # 圆周率
        print('math库中的圆周率常量值为{:.6f}'.format(math.pi))




'''
使用无穷级数这个公式计算π值，输入一个小数作为阈值，当最后一项的绝对值小于给定阈值时停止计算并输出得到的π值
'''

def leibniz_of_pi(error):
    """接收用户输入的浮点数阈值为参数，返回圆周率值"""
    # 补充你的代码
    a = 1
    b = 1
    suma = 0
    while 1/b>error:
        if a%2!=0:
            suma+=1/b
        else:
            suma-=1/b
        a+=1
        b+=2
    pi = 4*suma
    return pi

if __name__ == '__main__':
    threshold = float(input())
    print("{:.8f}".format( leibniz_of_pi(threshold)  ) ) #保留小数点后八位

import random


def monte_carlo_pi(num):
    """接收正整数为参数，表示随机点的数量，利用蒙特卡洛方法计算圆周率
    返回值为表示圆周率的浮点数"""
    # 补充你的代码
    c = 0
    for _ in range(num):
        x, y = random.uniform(-1, 1), random.uniform(-1, 1)
        if x ** 2 + y ** 2 <= 1:
            c += 1
    time = 4 * c / num
    return time


if __name__ == '__main__':
    sd = int(input())  # 读入随机数种子
    random.seed(sd)  # 设置随机数种子
    times = int(input())  # 输入正整数，表示产生点数量
    print(monte_carlo_pi(times))  # 输出圆周率值，浮点数

'''
利用梅钦公式计算圆周率的大小
'''
import math


def machin_of_pi():
    """用梅钦级数计算圆周率，返回圆周率值"""
    # 补充你的代码
    pi = 16 * math.atan(0.2) - 4 * math.atan(1 / 239)

    return pi


if __name__ == '__main__':
    cal_pi = machin_of_pi()  # 调用判断类型的函数
    print(cal_pi)  # 输出函数运行结果




import math


total_cost = float(input())           # '请输入总房价：'total_cost为当前房价
annual_salary = float(input())        # '请输入年薪：'
portion_saved = float(input()) / 100  # '请输入月存款比例：'月存款比例，输入30转为30%

# 根据首付款比例计算首付款金额和每个月需要存款数额
# 补充你的代码
down_payment = total_cost*0.3
current_savings = 0
number_of_months = 0
monthly_deposit = portion_saved*annual_salary/12
while current_savings < down_payment:
    current_savings+=monthly_deposit
    number_of_months+=1

print(f'首付 {down_payment:.2f} 元', )
print(f'月存款 {monthly_deposit:.2f} 元')

# 计算多少个月才能存够首付款，结果为整数，不足1月按1个月计算，即向上取整
# 补充你的代码




print(f'需要{math.ceil(number_of_months)}个月可以存够首付')





total_cost = float(input())           # total_cost为当前房价
annual_salary = float(input())        # 年薪
portion_saved = float(input()) / 100  # 月存款比例，输入30转为30%
semi_annual_raise = float(input()) /100     # 输入每半年加薪比例，输入7转化为7%

portion_down_payment = 0.3      # 首付比例，浮点数
# 补充你的代码，计算首付款
down_payment = portion_down_payment*total_cost

print(f'首付 {down_payment:.2f} 元')

current_savings = 0                                # 存款金额，从0开始
number_of_months = 0
monthly_salary = annual_salary/12                  # 月工资
monthly_deposit = monthly_salary * portion_saved   # 月存款
# 计算多少个月才能存够首付款，结果为整数，不足1月按1个月计算，即向上取整
# 补充你的代码
while current_savings < down_payment:
    number_of_months+=1
    current_savings+=monthly_deposit
    if number_of_months%6==0:
        monthly_salary+=semi_annual_raise*monthly_salary
        monthly_deposit=portion_saved*monthly_salary


    if number_of_months % 12 == 0:
        print("第{}个月月末有{:,.0f}元存款".format(number_of_months, current_savings))
print(f'需要{number_of_months}个月可以存够首付')





total_cost = float(input())           # total_cost为当前房价
annual_salary = float(input())        # 年薪
portion_saved = float(input()) / 100  # 月存款比例，输入30转为30%
semi_annual_raise = float(input()) /100     # 输入每半年加薪比例，输入7转化为7%

portion_down_payment = 0.3                         # 首付比例，浮点数
down_payment = portion_down_payment * total_cost   # 首付款
print(f'首付 {down_payment:.2f} 元')
interest_rate = 0.0225
current_savings = 0                                # 存款金额，从0开始
number_of_months = 0
# 补充你的代码，计算月工资，计算月存款
monthly_salary = annual_salary/12
monthly_deposit = monthly_salary * portion_saved
monthly_interest_rate = interest_rate / 12
# 补充你的代码，计算多少个月才能存够首付款，结果为整数，不足1月按1个月计算，即向上取整
while current_savings < down_payment:
    number_of_months+=1
    current_savings+=current_savings*monthly_interest_rate
    current_savings+=monthly_deposit
    if number_of_months%6==0:
        monthly_salary+=semi_annual_raise*monthly_salary
        monthly_deposit=portion_saved*monthly_salary
    if number_of_months % 12 == 0:
        print("第{}个月月末有{:,.0f}元存款".format(number_of_months, current_savings))
print(f'需要{number_of_months}个月可以存够首付')



# 补充你的代码
heads = 35
feet = 94
for i in range(35+1):
    for j in range(35-i+1):
        if i*2+j*4 == 94 and i+j==35:
            print(f'买{i}只鸡，买{j}只兔')



# 补充你的代码
a, b = map(int, input().split())
found = 0
for i in range(a+1):
    for j in range(a-i+1):
        if i*2+j*4 == b and i+j==a:
            print(f'有{i}只鸡，{j}只兔')
            found = True
if not found:
    print("Data Error!")



# 补充你的代码
a, b = map(int, input().split())
found = False
for i in range(a+1):
    for j in range(a-i+1):
        if i*2+j*4 == b and i+j==a:
            for chickens in range(3,i,3):
                if (i-chickens)/(j-chickens/3)==1/2:
                    print(f"A笼中有鸡{chickens}只，兔{int(chickens/3)}只")
                    print(f"B笼中有鸡{i-chickens}只，兔{j-int(chickens/3)}只")
                    print(f"两笼共有鸡{i}只，兔{j}只")
                    found = True
if not found:
    print("无合适的组合方案")



# 请补充你的代码
sides = sorted([float(input()),
                float(input()),
                float(input())])
if sides[0] > 0:
    if sides[0]**2 + sides[1]**2 == sides[2]**2:
        print("YES")
    else:
        print("NO")
else:
    print("NO")



# 请补充你的代码
n = int(input())
if (n%4==0 and n%100!=0) or n%400==0:
    print(366)
else:
    print(365)




# 请补充你的代码
import math
a = float(input())
b = float(input())
c = float(input())
if a+b>c and a+c >b and b+c >a:
    print("YES")
    s = (a+b+c)/2
    area = math.sqrt(s * (s - a) * (s - b) * (s - c))
    print(f'{area:.2f}')
else:
    print("NO")





# 请补充你的代码
man = int(input())
woman = int(input())
s = input()
if s =="男":
    print(int((man+woman)*1.08/2))
elif s == "女":
    print(int((man*0.923+woman)/2))
else:
    print("无对应公式")




# 请补充你的代码
def cal(sy):
    if sy<0:
        print("error")
        return
    elif sy==0:
        print("应缴税款0.00元，实发工资0.00元。")
        return
    tax = sy-5000
    if tax<=0:
        tx = 0
    elif tax <= 3000:
        tx = tax * 0.03 - 0
    elif 3000 < tax <= 12000:
        tx = tax * 0.1 - 210
    elif 12000 < tax <= 25000:
        tx = tax * 0.2 - 1410
    elif 25000 < tax <= 35000:
        tx = tax * 0.25 - 2660
    elif 35000 < tax <= 55000:
        tx = tax * 0.3 - 4410
    elif 55000 < tax <= 80000:
        tx = tax * 0.35 - 7160
    else:
        tx = tax * 0.45 - 15160
    after_tax = sy-tx
    print(f"应缴税款{tx:.2f}元，实发工资{after_tax:.2f}元。")

salary = float(input())
cal(salary)



# 请补充你的代码
n = int(input())
found = False
if (n%4==0 and n%100!=0) or n%400==0:
    found = True
    print(found)
else:
    print(found)




# 请补充你的代码
import math
x = int(input())
if x > 6 or x < -6:
    print(0)
elif x >= 3 and x <= 6:
    print(pow(x,x-2))
elif x >= 0 and x < 3:
    print(math.factorial(x))
else:
    print(abs(x)+5)



# 请补充你的代码
a=eval(input())
if 90<= a <=100:
    print("A")
elif 80<= a <90:
    print("B")
elif 70<= a <80:
    print("C")
elif 60<=  a <70:
    print("D")
elif 0 <= a <60:
    print("E")
elif 0 > a or a >100:
    print("data error!")




# 请补充你的代码
n = int(input())

num = 1
a = 1
b = 1
if n == 1:
    num = 1
elif n > 1:
    for i in range(1, n):
        x = i
        y = a + b
        a = b
        b = y
        num += x / y * pow(-1, i)
print('{:.6f}'.format(num))




# 请补充你的代码
n = int(input())
num = 0
for i in range(n+1):
    num+=i*i
print(num)




# 请补充你的代码
for rooster in range(1, 20):
    for hen in range(1, 33):
        chick = 100 - rooster - hen
        if chick > 0 and (5 * rooster + 3 * hen + chick / 3) == 100:
            print(f"{rooster} {hen} {chick}")




# 请补充你的代码
time = 0
while time<3:
    s = input()
    ans = input()
    if (s=="admin" or s == "administrator") and ans == "012345":
        print("登录成功")
        break
    else:
        print("登录失败")
        continue
    time+=1




# 补充你的代码
a, b = map(int, input().split())
found = 0
for i in range(a+1):
    for j in range(a-i+1):
        if i*2+j*4 == b and i+j==a:
            print(f'有{i}只鸡，{j}只兔')
            found = True
if not found:
    print("Data Error!")




# 请补充你的代码
a, b, c = map(int, input().split("/"))
days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
if (a%4==0 and a%100!=0) or a%400==0:
    days[1]=29
sumDay = sum(days[:b - 1]) + c
print('{}年{}月{}日是{}年第{}天'.format(a, b, c, a, sumDay))




# 请补充你的代码
n = int(input())
count = 0
for i in range(1,n+1):
    if i%3==2 and i%5==3 and i%7==2:
        print(i)
        count+=1
if count == 0:
    print("No solution!")



wall = int(input())
big = 1
sma = 1
day = 0
db = 0
ds = 0
t = 0
if wall == 2:
    print(1)
    print(1, 1)
else:
    while wall > 0:
        if wall - big - sma < 0:
            t = wall / (big + sma)
            break
        wall -= (big + sma)
        day += 1
        db += big
        ds += sma
        big *= 2
        sma /= 2
    if t < 1:
        day+=1
    db+=big*t
    ds+=sma*t
    print(day)
    print(round(ds, 1), round(db, 1))



n = int(input())
for i in range(n):
    print(i,end = ' ')


start = int(input())  # 输入一个整数表示数列起点

# 补充一条语句，输入一个整数表示数列终点
end = int(input())

# 补充一条语句，输入一个整数表示数列的步长
n = int(input())

# 输入2条语句，在一行内输出等差数列，数字后跟一个空格
for i in range(start,end,n):
    print(i,end = ' ')


sum = 0
n = int(input())
for i in range(0,n,2):
    sum+=i
print(sum)


sum = 0
n = int(input())
for i in range(1,n,2):
    sum+=1/i
print(sum)



sum = 0
f = 1
n = int(input())
for i in range(1,n,2):
    sum+=f*1/i
    f = -f
print(sum)



sum = 0
f = 1
n = int(input())
for i in range(1,n*2,2):
    sum+=f*1/i
    f = -f
print(sum)
print(sum*4)



sum = 0
f = 1
n = float(input())
i = 1
while 1/i>n:
    sum+=f*1/i
    f = -f
    i+=2
print(sum)
print(sum*4)



m = int(input())
n = int(input())

for i in range(1,n + 1):
    for j in range(1,n - i + 1):
        k = n - i - j
        if 5 * i + 3 * j + k/3 == m:
            print(i, j, k)



m = int(input())
n = int(input())


min_cock = float('inf')
min_hen = float('inf')
best_solution = None

for i in range(1, n + 1):
    for j in range(1, n - i + 1):
        k = n - i - j
        if 5 * i + 3 * j + k / 3 == m:
            if i < min_cock or (i == min_cock and j < min_hen):
                min_cock = i
                min_hen = j
                best_solution = (i, j, k)

if best_solution:
    print(best_solution[0], best_solution[1], best_solution[2])
else:
    print("无解")


year, month, day = map(int, input().split('/'))
days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
    days[1] = 29
sumDay = sum(days[:month - 1]) + day
print('{}年{}月{}日是{}年第{}天'.format(year, month, day, year, sumDay))



sides = sorted([float(input()),
                float(input()),
                float(input())])
if sides[0] > 0:
    if sides[0]**2 + sides[1]**2 == sides[2]**2:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

import math
x = int(input())
if x > 6 or x < -6:
    print(0)
elif x >= 3 and x <= 6:
    print(pow(x,x-2))
elif x >= 0 and x < 3:
    print(math.factorial(x))
else:
    print(abs(x)+5)



a=eval(input())
if 90<= a <=100:
    print("A")
elif 80<= a <90:
    print("B")
elif 70<= a <80:
    print("C")
elif 60<=  a <70:
    print("D")
elif 0 <= a <60:
    print("E")
elif 0 > a or a >100:
    print("data error!")



man = int(input())
woman = int(input())
s = input()
if s =="男":
    print(int((man+woman)*1.08/2))
elif s == "女":
    print(int((man*0.923+woman)/2))
else:
    print("无对应公式")



import math
a = float(input())
b = float(input())
c = float(input())
if a+b>c and a+c >b and b+c >a:
    print("YES")
    s = (a+b+c)/2
    area = math.sqrt(s * (s - a) * (s - b) * (s - c))
    print(f'{area:.2f}')
else:
    print("NO")


def calculate_tax(salary):
    if salary < 0:
        print("error")
        return
    elif (salary == 0):
        print("应缴税款0.00元，实发工资0.00元。")
        return
    taxable_income = salary - 5000
    if taxable_income <= 0:
        tax = 0
    elif taxable_income <= 3000:
        tax = taxable_income * 0.03 - 0
    elif 3000 < taxable_income <= 12000:
        tax = taxable_income * 0.1 - 210
    elif 12000 < taxable_income <= 25000:
        tax = taxable_income * 0.2 - 1410
    elif 25000 < taxable_income <= 35000:
        tax = taxable_income * 0.25 - 2660
    elif 35000 < taxable_income <= 55000:
        tax = taxable_income * 0.3 - 4410
    elif 55000 < taxable_income <= 80000:
        tax = taxable_income * 0.35 - 7160
    else:
        tax = taxable_income * 0.45 - 15160

    after_tax_salary = salary - tax
    print(f"应缴税款{tax:.2f}元，实发工资{after_tax_salary:.2f}元。")


salary = float(input())
calculate_tax(salary)




n = int(input())

if (n % 4 == 0 and n % 100 !=0) or (n % 400 ==0):
    print("True")
else:
    print("False")



s = input()
letter = 0
num = 0
other = 0
for char in s:
    if char.isalpha():
        letter+=1
    elif char.isdigit():
        num+=1
    else:
        other+=1
print(f'letter = {letter}, digit = {num}, other = {other}')




import math
a = float(input())
b = float(input())
c = float(input())

if a == 0:
    if b == 0:
        print("Data error!")
    else:
        x = -c/b
        print(f'{x:.2f}')
else:
    deta = b*b-4*a*c
    if deta <0:
        print("该方程无实数解")
    elif deta == 0:
        x = -b/2/a
        print(f'{x:.2f}')
    else:
        x1 = (-b+math.sqrt(deta))/2/a
        x2 = (-b-math.sqrt(deta))/2/a
        print(f'{max(x1, x2):.2f} {min(x1, x2):.2f}')


n = int(input())
count = 0
for i in range(n+1):
    if i%3 == 2 and i%5 ==3 and i%7==2:
        print(i)
        count+=1
if count == 0:
    print("No solution!")

    for rooster in range(1, 20):
        for hen in range(1, 33):
            chick = 100 - rooster - hen
            if chick > 0 and (5 * rooster + 3 * hen + chick / 3) == 100:
                print(f"{rooster} {hen} {chick}")


N = int(input())

def is_prime(num):
    if num <2:
        return False
    for i in range(2,int(num**0.5)+1):
        if num %i == 0:
            return False
    return True
for i in range(N,1,-1):
    if is_prime(i):
        print(i)
        break
